how to use ternary operator